In [1]:
!pip install -q git+https://github.com/tensorflow/examples.git
In [2]:
!pip install -q tensorflow-gpu==2.0.0-beta1
import tensorflow as tf
In [3]:
from __future__ import absolute_import, division, print_function, unicode_literals

# import tensorflow_datasets as tfds
from tensorflow_examples.models.pix2pix import pix2pix

import os
import time
import matplotlib.pyplot as plt
from IPython.display import clear_output

# tfds.disable_progress_bar()
AUTOTUNE = tf.data.experimental.AUTOTUNE
In [4]:
from PIL import Image 
import numpy
from scipy.misc import toimage
import scipy.ndimage
import matplotlib.pyplot as plt
In [5]:
def dodge(front,back):
    result=front*255/(255-back) 
    result[result>255]=255
    result[back==255]=255
    return result.astype('uint8')

def grayscale(rgb):
    return numpy.dot(rgb[...,:3], [0.299, 0.587, 0.114])
In [6]:
from PIL import ImageEnhance
from PIL import ImageOps

def enhance_image(original_image):
    enhanced_image = ImageEnhance.Contrast(original_image).enhance(1.)
    enhanced_image = ImageEnhance.Sharpness(enhanced_image).enhance(4.0)
    enhanced_image = ImageEnhance.Color(enhanced_image).enhance(0.0)
    #enhanced_image = ImageOps.invert(enhanced_image)
    
    plt.subplot(121)
    plt.title('Original')
    plt.imshow(numpy.array(original_image))

    plt.subplot(122)
    plt.title('Enhanced')
    plt.imshow(numpy.array(enhanced_image))
    
    return enhanced_image
In [7]:
image = Image.open('train_photos/n12998815_9340.jpg')
enhance_image(image)
Out[7]:
In [8]:
# LOAD TRAINING PHOTOS
folder = 'train_photos/'
file_names = [f for f in os.listdir(folder) if os.path.isfile(os.path.join(folder, f))]
print("Loading {0} photo training images...".format(len(file_names)))
train_photos = []
labels = []
for file_name in file_names:
    image = Image.open(folder + '/' + file_name)
    image = enhance_image(image)
    train_photos.append(numpy.array(image))
    labels.append(0)
print("Successfully loaded training photos!\n")
train_photos_ds = tf.data.Dataset.from_tensor_slices((train_photos, labels))

# LOAD TRAINING SKETCHES
folder = 'train_sketches/'
file_names = [f for f in os.listdir(folder) if os.path.isfile(os.path.join(folder, f))]
print("Loading {0} sketch training images...".format(len(file_names)))
train_sketches = []
labels = []
for file_name in file_names:
    image = Image.open(folder + '/' + file_name)
    train_sketches.append(numpy.array(image))
    labels.append(1)
print("Successfully loaded training sketches!\n")
train_sketches_ds = tf.data.Dataset.from_tensor_slices((train_sketches, labels))

# LOAD TEST PHOTOS
folder = 'test_photos/'
file_names = [f for f in os.listdir(folder) if os.path.isfile(os.path.join(folder, f))]
print("Loading {0} photo testing images...".format(len(file_names)))
test_photos = []
labels = []
for file_name in file_names:
    image = Image.open(folder + '/' + file_name)
    image = enhance_image(image)
    test_photos.append(numpy.array(image))
    labels.append(0)
print("Successfully loaded testing photos!\n")
test_photos_ds = tf.data.Dataset.from_tensor_slices((test_photos, labels))

# LOAD TEST SKETCHES
folder = 'test_sketches/'
file_names = [f for f in os.listdir(folder) if os.path.isfile(os.path.join(folder, f))]
print("Loading {0} sketch testing images...".format(len(file_names)))
test_sketches = []
labels = []
for file_name in file_names:
    image = Image.open(folder + '/' + file_name)
    test_sketches.append(numpy.array(image))
    labels.append(1)
print("Successfully loaded testing sketches!\n")
test_sketches_ds = tf.data.Dataset.from_tensor_slices((test_sketches, labels))
    
# Show first image in the array to confirm the images were loaded.
# Image.fromarray(train_photos[0]).show()
Loading 89 photo training images...
/local/scratch/blacklleyt/anaconda3/lib/python3.7/site-packages/matplotlib/figure.py:98: MatplotlibDeprecationWarning: 
Adding an axes using the same arguments as a previous axes currently reuses the earlier instance.  In a future version, a new instance will always be created and returned.  Meanwhile, this warning can be suppressed, and the future behavior ensured, by passing a unique label to each axes instance.
  "Adding an axes using the same arguments as a previous axes "
Successfully loaded training photos!

Loading 518 sketch training images...
Successfully loaded training sketches!

Loading 5 photo testing images...
Successfully loaded testing photos!

Loading 5 sketch testing images...
Successfully loaded testing sketches!

In [9]:
BUFFER_SIZE = 1000
BATCH_SIZE = 1
IMG_WIDTH = 256
IMG_HEIGHT = 256
In [10]:
def random_crop(image):
    cropped_image = tf.image.random_crop(image, size=[IMG_HEIGHT, IMG_WIDTH, 3])
    return cropped_image
In [11]:
# normalizing the images to [-1, 1]
def normalize(image):
    image = tf.cast(image, tf.float32)
    image = (image / 127.5) - 1
    return image
In [12]:
def random_jitter(image):
    # resizing to 286 x 286 x 3
    image = tf.image.resize(image, [286, 286],method=tf.image.ResizeMethod.NEAREST_NEIGHBOR)
    
    # randomly cropping to 256 x 256 x 3
    image = random_crop(image)

    # random mirroring
    image = tf.image.random_flip_left_right(image)
    
    return image
In [13]:
def preprocess_image_train(image, label):
    image = random_jitter(image)
    image = normalize(image)
    return image
In [14]:
def preprocess_image_test(image, label):
    image = normalize(image)
    return image
In [15]:
train_photos_ds = train_photos_ds.map(
    preprocess_image_train,
    num_parallel_calls=AUTOTUNE).cache().shuffle(BUFFER_SIZE).batch(1)

train_sketches_ds = train_sketches_ds.map(
    preprocess_image_train,
    num_parallel_calls=AUTOTUNE).cache().shuffle(BUFFER_SIZE).batch(1)

test_photos_ds = test_photos_ds.map(
    preprocess_image_test,
    num_parallel_calls=AUTOTUNE).cache().shuffle(BUFFER_SIZE).batch(1)

test_sketches_ds = test_sketches_ds.map(
    preprocess_image_test,
    num_parallel_calls=AUTOTUNE).cache().shuffle(BUFFER_SIZE).batch(1)
In [16]:
sample_photo = next(iter(train_photos_ds))
sample_sketch = next(iter(train_sketches_ds))
In [17]:
plt.subplot(121)
plt.title('Photo')
plt.imshow(sample_photo[0] * 0.5 + 0.5)

plt.subplot(122)
plt.title('Photo with random jitter')
plt.imshow(random_jitter(sample_photo[0]) * 0.5 + 0.5)
Out[17]:
<matplotlib.image.AxesImage at 0x7f6a60083828>
In [18]:
plt.subplot(121)
plt.title('Sketch')
plt.imshow(sample_sketch[0] * 0.5 + 0.5)

plt.subplot(122)
plt.title('Sketch with random jitter')
plt.imshow(random_jitter(sample_sketch[0]) * 0.5 + 0.5)
Out[18]:
<matplotlib.image.AxesImage at 0x7f6a583cde80>
In [19]:
OUTPUT_CHANNELS = 3

generator_g = pix2pix.unet_generator(OUTPUT_CHANNELS, norm_type='instancenorm')
generator_f = pix2pix.unet_generator(OUTPUT_CHANNELS, norm_type='instancenorm')

discriminator_x = pix2pix.discriminator(norm_type='instancenorm', target=False)
discriminator_y = pix2pix.discriminator(norm_type='instancenorm', target=False)
In [20]:
to_sketch = generator_g(sample_photo)
to_photo = generator_f(sample_sketch)
plt.figure(figsize=(8, 8))
contrast = 8

imgs = [sample_photo, to_sketch, sample_sketch, to_photo]
title = ['Photo', 'To Sketch', 'Sketch', 'To Photo']

for i in range(len(imgs)):
    plt.subplot(2, 2, i+1)
    plt.title(title[i])
    if i % 2 == 0:
        plt.imshow(imgs[i][0] * 0.5 + 0.5)
    else:
        plt.imshow(imgs[i][0] * 0.5 * contrast + 0.5)
plt.show()
WARNING: Logging before flag parsing goes to stderr.
W0730 16:35:56.481875 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
In [21]:
plt.figure(figsize=(8, 8))

plt.subplot(121)
plt.title('Is a real sketch?')
plt.imshow(discriminator_y(sample_sketch)[0, ..., -1], cmap='RdBu_r')

plt.subplot(122)
plt.title('Is a real photo?')
plt.imshow(discriminator_x(sample_photo)[0, ..., -1], cmap='RdBu_r')

plt.show()
In [22]:
LAMBDA = 10
In [23]:
loss_obj = tf.keras.losses.BinaryCrossentropy(from_logits=True)
In [24]:
def discriminator_loss(real, generated):
    real_loss = loss_obj(tf.ones_like(real), real)
    
    generated_loss = loss_obj(tf.zeros_like(generated), generated)
    
    total_disc_loss = real_loss + generated_loss
    
    return total_disc_loss * 0.5
In [25]:
def generator_loss(generated):
    return loss_obj(tf.ones_like(generated), generated)
In [26]:
def calc_cycle_loss(real_image, cycled_image):
    loss1 = tf.reduce_mean(tf.abs(real_image - cycled_image))
    
    return LAMBDA * loss1
In [27]:
def identity_loss(real_image, same_image):
    loss = tf.reduce_mean(tf.abs(real_image - same_image))
    return LAMBDA * 0.5 * loss
In [28]:
generator_g_optimizer = tf.keras.optimizers.Adam(2e-4, beta_1=0.5)
generator_f_optimizer = tf.keras.optimizers.Adam(2e-4, beta_1=0.5)

discriminator_x_optimizer = tf.keras.optimizers.Adam(2e-4, beta_1=0.5)
discriminator_y_optimizer = tf.keras.optimizers.Adam(2e-4, beta_1=0.5)
In [29]:
checkpoint_path = "./checkpoints/train"

ckpt = tf.train.Checkpoint(generator_g=generator_g,
                           generator_f=generator_f,
                           discriminator_x=discriminator_x,
                           discriminator_y=discriminator_y,
                           generator_g_optimizer=generator_g_optimizer,
                           generator_f_optimizer=generator_f_optimizer,
                           discriminator_x_optimizer=discriminator_x_optimizer,
                           discriminator_y_optimizer=discriminator_y_optimizer)

ckpt_manager = tf.train.CheckpointManager(ckpt, checkpoint_path, max_to_keep=5)

# if a checkpoint exists, restore the latest checkpoint.
if ckpt_manager.latest_checkpoint:
    ckpt.restore(ckpt_manager.latest_checkpoint)
    print ('Latest checkpoint restored!!')
In [30]:
EPOCHS = 200
In [31]:
def generate_images(model, test_input):
    prediction = model(test_input)
    
    plt.figure(figsize=(12, 12))

    display_list = [test_input[0], prediction[0]]
    title = ['Input Image', 'Predicted Image']

    for i in range(2):
        plt.subplot(1, 2, i+1)
        plt.title(title[i])
        # getting the pixel values between [0, 1] to plot it.
        plt.imshow(display_list[i] * 0.5 + 0.5)
        plt.axis('off')
    plt.show()
In [32]:
@tf.function
def train_step(real_x, real_y):
    # persistent is set to True because the tape is used more than
    # once to calculate the gradients.
    with tf.GradientTape(persistent=True) as tape:
        # Generator G translates X -> Y
        # Generator F translates Y -> X.
    
        fake_y = generator_g(real_x, training=True)
        cycled_x = generator_f(fake_y, training=True)

        fake_x = generator_f(real_y, training=True)
        cycled_y = generator_g(fake_x, training=True)

        # same_x and same_y are used for identity loss.
        same_x = generator_f(real_x, training=True)
        same_y = generator_g(real_y, training=True)

        disc_real_x = discriminator_x(real_x, training=True)
        disc_real_y = discriminator_y(real_y, training=True)

        disc_fake_x = discriminator_x(fake_x, training=True)
        disc_fake_y = discriminator_y(fake_y, training=True)

        # calculate the loss
        gen_g_loss = generator_loss(disc_fake_y)
        gen_f_loss = generator_loss(disc_fake_x)
    
        total_cycle_loss = calc_cycle_loss(real_x, cycled_x) + calc_cycle_loss(real_y, cycled_y)
    
        # Total generator loss = adversarial loss + cycle loss
        total_gen_g_loss = gen_g_loss + total_cycle_loss + identity_loss(real_y, same_y)
        total_gen_f_loss = gen_f_loss + total_cycle_loss + identity_loss(real_x, same_x)

        disc_x_loss = discriminator_loss(disc_real_x, disc_fake_x)
        disc_y_loss = discriminator_loss(disc_real_y, disc_fake_y)
  
    # Calculate the gradients for generator and discriminator
    generator_g_gradients = tape.gradient(total_gen_g_loss, 
                                        generator_g.trainable_variables)
    generator_f_gradients = tape.gradient(total_gen_f_loss, 
                                        generator_f.trainable_variables)
  
    discriminator_x_gradients = tape.gradient(disc_x_loss, 
                                            discriminator_x.trainable_variables)
    discriminator_y_gradients = tape.gradient(disc_y_loss, 
                                            discriminator_y.trainable_variables)
  
    # Apply the gradients to the optimizer
    generator_g_optimizer.apply_gradients(zip(generator_g_gradients, 
                                            generator_g.trainable_variables))

    generator_f_optimizer.apply_gradients(zip(generator_f_gradients, 
                                            generator_f.trainable_variables))
  
    discriminator_x_optimizer.apply_gradients(zip(discriminator_x_gradients,
                                                discriminator_x.trainable_variables))
  
    discriminator_y_optimizer.apply_gradients(zip(discriminator_y_gradients,
                                                discriminator_y.trainable_variables))
In [33]:
for epoch in range(EPOCHS):
    start = time.time()
    print('Training epoch {} of {}.'.format(epoch + 1, EPOCHS))
    n = 0
    for image_x, image_y in tf.data.Dataset.zip((train_photos_ds, train_sketches_ds)):
        train_step(image_x, image_y)
        if n % 10 == 0:
            print ('.', end='')
        n+=1

    # Using a consistent image (sample_photo) so that the progress of the model
    # is clearly visible.
    generate_images(generator_g, sample_photo)

    if (epoch + 1) % 5 == 0:
        ckpt_save_path = ckpt_manager.save()
        print ('Saving checkpoint for epoch {} at {}'.format(epoch+1, ckpt_save_path))

    print ('Time taken for epoch {} is {} sec\n'.format(epoch + 1, time.time()-start))
Training epoch 1 of 200.
W0730 16:36:01.563334 140096003381056 deprecation.py:323] From /home/blacklleyt/.local/lib/python3.7/site-packages/tensorflow/python/ops/nn_impl.py:182: add_dispatch_support.<locals>.wrapper (from tensorflow.python.ops.array_ops) is deprecated and will be removed in a future version.
Instructions for updating:
Use tf.where in 2.0, which has the same broadcast rule as np.where
.........
Time taken for epoch 1 is 354.37544226646423 sec

Training epoch 2 of 200.
.........
Time taken for epoch 2 is 299.98997735977173 sec

Training epoch 3 of 200.
.........
Time taken for epoch 3 is 301.5126597881317 sec

Training epoch 4 of 200.
.........
Time taken for epoch 4 is 300.94099497795105 sec

Training epoch 5 of 200.
.........
Saving checkpoint for epoch 5 at ./checkpoints/train/ckpt-1
Time taken for epoch 5 is 301.4327094554901 sec

Training epoch 6 of 200.
.........
Time taken for epoch 6 is 299.52186155319214 sec

Training epoch 7 of 200.
.........
Time taken for epoch 7 is 300.78277802467346 sec

Training epoch 8 of 200.
.........
Time taken for epoch 8 is 301.675742149353 sec

Training epoch 9 of 200.
.........
W0730 17:21:57.682567 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Time taken for epoch 9 is 300.2472929954529 sec

Training epoch 10 of 200.
.........
W0730 17:26:58.780655 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Saving checkpoint for epoch 10 at ./checkpoints/train/ckpt-2
Time taken for epoch 10 is 303.0292866230011 sec

Training epoch 11 of 200.
.........
Time taken for epoch 11 is 300.0672833919525 sec

Training epoch 12 of 200.
.........
W0730 17:37:01.458914 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Time taken for epoch 12 is 300.6698169708252 sec

Training epoch 13 of 200.
.........
W0730 17:42:01.865682 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Time taken for epoch 13 is 300.40896677970886 sec

Training epoch 14 of 200.
.........
W0730 17:47:02.444194 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Time taken for epoch 14 is 300.56608533859253 sec

Training epoch 15 of 200.
.........
W0730 17:52:03.773194 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Saving checkpoint for epoch 15 at ./checkpoints/train/ckpt-3
Time taken for epoch 15 is 303.3130393028259 sec

Training epoch 16 of 200.
.........
W0730 17:57:05.673822 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Time taken for epoch 16 is 299.91651582717896 sec

Training epoch 17 of 200.
.........
W0730 18:02:06.499210 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Time taken for epoch 17 is 300.8080072402954 sec

Training epoch 18 of 200.
.........
W0730 18:07:06.981175 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Time taken for epoch 18 is 300.502724647522 sec

Training epoch 19 of 200.
.........
W0730 18:12:08.164858 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Time taken for epoch 19 is 301.17005038261414 sec

Training epoch 20 of 200.
.........
W0730 18:17:08.482547 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Saving checkpoint for epoch 20 at ./checkpoints/train/ckpt-4
Time taken for epoch 20 is 303.9432852268219 sec

Training epoch 21 of 200.
.........
W0730 18:22:11.717254 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Time taken for epoch 21 is 299.62918186187744 sec

Training epoch 22 of 200.
.........
W0730 18:27:11.178559 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Time taken for epoch 22 is 299.4399297237396 sec

Training epoch 23 of 200.
.........
W0730 18:32:11.187230 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Time taken for epoch 23 is 299.99547290802 sec

Training epoch 24 of 200.
.........
W0730 18:37:10.783164 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Time taken for epoch 24 is 299.61984419822693 sec

Training epoch 25 of 200.
.........
W0730 18:42:10.763439 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Saving checkpoint for epoch 25 at ./checkpoints/train/ckpt-5
Time taken for epoch 25 is 303.06214809417725 sec

Training epoch 26 of 200.
.........
W0730 18:47:13.535174 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Time taken for epoch 26 is 299.692875623703 sec

Training epoch 27 of 200.
.........
W0730 18:52:13.660183 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Time taken for epoch 27 is 300.11437463760376 sec

Training epoch 28 of 200.
.........
W0730 18:57:14.248592 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Time taken for epoch 28 is 300.58998560905457 sec

Training epoch 29 of 200.
.........
W0730 19:02:15.003264 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Time taken for epoch 29 is 300.7524015903473 sec

Training epoch 30 of 200.
.........
W0730 19:07:16.238481 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Saving checkpoint for epoch 30 at ./checkpoints/train/ckpt-6
Time taken for epoch 30 is 304.70282077789307 sec

Training epoch 31 of 200.
.........
W0730 19:12:19.600769 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Time taken for epoch 31 is 299.88381242752075 sec

Training epoch 32 of 200.
.........
W0730 19:17:19.339356 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Time taken for epoch 32 is 299.74321007728577 sec

Training epoch 33 of 200.
.........
W0730 19:22:18.977829 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Time taken for epoch 33 is 299.63701581954956 sec

Training epoch 34 of 200.
.........
W0730 19:27:18.137772 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Time taken for epoch 34 is 299.16732263565063 sec

Training epoch 35 of 200.
.........
W0730 19:32:18.158168 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Saving checkpoint for epoch 35 at ./checkpoints/train/ckpt-7
Time taken for epoch 35 is 303.53733491897583 sec

Training epoch 36 of 200.
.........
W0730 19:37:23.414457 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Time taken for epoch 36 is 301.73743510246277 sec

Training epoch 37 of 200.
.........
W0730 19:42:24.618097 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Time taken for epoch 37 is 301.206041097641 sec

Training epoch 38 of 200.
.........
W0730 19:47:22.816889 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Time taken for epoch 38 is 298.192498922348 sec

Training epoch 39 of 200.
.........
W0730 19:52:20.794713 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Time taken for epoch 39 is 297.96990394592285 sec

Training epoch 40 of 200.
.........
W0730 19:57:18.870975 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Saving checkpoint for epoch 40 at ./checkpoints/train/ckpt-8
Time taken for epoch 40 is 301.978031873703 sec

Training epoch 41 of 200.
.........
W0730 20:02:20.003715 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Time taken for epoch 41 is 297.23821568489075 sec

Training epoch 42 of 200.
.........
W0730 20:07:17.711473 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Time taken for epoch 42 is 297.7121970653534 sec

Training epoch 43 of 200.
.........
W0730 20:12:16.156461 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Time taken for epoch 43 is 298.43132972717285 sec

Training epoch 44 of 200.
.........
W0730 20:17:13.364709 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Time taken for epoch 44 is 297.20490622520447 sec

Training epoch 45 of 200.
.........
W0730 20:22:10.981597 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Saving checkpoint for epoch 45 at ./checkpoints/train/ckpt-9
Time taken for epoch 45 is 301.2062110900879 sec

Training epoch 46 of 200.
.........
W0730 20:27:12.921980 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Time taken for epoch 46 is 298.3657901287079 sec

Training epoch 47 of 200.
.........
W0730 20:32:11.298256 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Time taken for epoch 47 is 298.3763949871063 sec

Training epoch 48 of 200.
.........
W0730 20:37:07.962857 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Time taken for epoch 48 is 296.65277194976807 sec

Training epoch 49 of 200.
.........
W0730 20:42:05.047780 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Time taken for epoch 49 is 297.08629965782166 sec

Training epoch 50 of 200.
.........
W0730 20:47:02.669365 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Saving checkpoint for epoch 50 at ./checkpoints/train/ckpt-10
Time taken for epoch 50 is 301.21914982795715 sec

Training epoch 51 of 200.
.........
W0730 20:52:03.485742 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Time taken for epoch 51 is 297.2337336540222 sec

Training epoch 52 of 200.
.........
W0730 20:57:00.743324 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Time taken for epoch 52 is 297.2479393482208 sec

Training epoch 53 of 200.
.........
W0730 21:01:57.099076 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Time taken for epoch 53 is 296.3572669029236 sec

Training epoch 54 of 200.
.........
W0730 21:06:53.723859 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Time taken for epoch 54 is 296.627690076828 sec

Training epoch 55 of 200.
.........
W0730 21:11:50.545724 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Saving checkpoint for epoch 55 at ./checkpoints/train/ckpt-11
Time taken for epoch 55 is 300.32356810569763 sec

Training epoch 56 of 200.
.........
W0730 21:16:50.545717 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Time taken for epoch 56 is 296.5068609714508 sec

Training epoch 57 of 200.
.........
W0730 21:21:47.361758 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Time taken for epoch 57 is 296.81814217567444 sec

Training epoch 58 of 200.
.........
W0730 21:26:44.780740 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Time taken for epoch 58 is 297.40307688713074 sec

Training epoch 59 of 200.
.........
W0730 21:31:42.379424 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Time taken for epoch 59 is 297.59781885147095 sec

Training epoch 60 of 200.
.........
W0730 21:36:39.745061 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Saving checkpoint for epoch 60 at ./checkpoints/train/ckpt-12
Time taken for epoch 60 is 301.014356136322 sec

Training epoch 61 of 200.
.........
W0730 21:41:40.401003 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Time taken for epoch 61 is 297.0175404548645 sec

Training epoch 62 of 200.
.........
W0730 21:46:37.776630 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Time taken for epoch 62 is 297.3715195655823 sec

Training epoch 63 of 200.
.........
W0730 21:51:35.438409 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Time taken for epoch 63 is 297.6557891368866 sec

Training epoch 64 of 200.
.........
W0730 21:56:32.861236 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Time taken for epoch 64 is 297.4332604408264 sec

Training epoch 65 of 200.
.........
W0730 22:01:30.535589 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Saving checkpoint for epoch 65 at ./checkpoints/train/ckpt-13
Time taken for epoch 65 is 301.2206127643585 sec

Training epoch 66 of 200.
.........
W0730 22:06:31.870096 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Time taken for epoch 66 is 297.79259991645813 sec

Training epoch 67 of 200.
.........
W0730 22:11:29.630295 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Time taken for epoch 67 is 297.7592349052429 sec

Training epoch 68 of 200.
.........
W0730 22:16:26.804235 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Time taken for epoch 68 is 297.14943075180054 sec

Training epoch 69 of 200.
.........
W0730 22:21:24.612918 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Time taken for epoch 69 is 297.81892228126526 sec

Training epoch 70 of 200.
.........
W0730 22:26:21.813078 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Saving checkpoint for epoch 70 at ./checkpoints/train/ckpt-14
Time taken for epoch 70 is 300.47132182121277 sec

Training epoch 71 of 200.
.........
W0730 22:31:23.378134 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Time taken for epoch 71 is 298.29752922058105 sec

Training epoch 72 of 200.
.........
W0730 22:36:21.436823 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Time taken for epoch 72 is 298.05813813209534 sec

Training epoch 73 of 200.
.........
W0730 22:41:19.961267 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Time taken for epoch 73 is 298.52026414871216 sec

Training epoch 74 of 200.
.........
W0730 22:46:18.880822 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Time taken for epoch 74 is 298.9336714744568 sec

Training epoch 75 of 200.
.........
W0730 22:51:16.884545 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Saving checkpoint for epoch 75 at ./checkpoints/train/ckpt-15
Time taken for epoch 75 is 301.2069818973541 sec

Training epoch 76 of 200.
.........
W0730 22:56:17.647171 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Time taken for epoch 76 is 297.55929732322693 sec

Training epoch 77 of 200.
.........
W0730 23:01:14.898801 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Time taken for epoch 77 is 297.244003534317 sec

Training epoch 78 of 200.
.........
W0730 23:06:12.397508 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Time taken for epoch 78 is 297.49751138687134 sec

Training epoch 79 of 200.
.........
W0730 23:11:09.305381 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Time taken for epoch 79 is 296.9055767059326 sec

Training epoch 80 of 200.
.........
W0730 23:16:07.094117 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Saving checkpoint for epoch 80 at ./checkpoints/train/ckpt-16
Time taken for epoch 80 is 300.904584646225 sec

Training epoch 81 of 200.
.........
W0730 23:21:08.103878 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Time taken for epoch 81 is 297.89081144332886 sec

Training epoch 82 of 200.
.........
W0730 23:26:06.156847 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Time taken for epoch 82 is 298.053946018219 sec

Training epoch 83 of 200.
.........
W0730 23:31:04.163037 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Time taken for epoch 83 is 298.01419377326965 sec

Training epoch 84 of 200.
.........
W0730 23:36:02.238200 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Time taken for epoch 84 is 298.07668948173523 sec

Training epoch 85 of 200.
.........
W0730 23:41:00.678877 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Saving checkpoint for epoch 85 at ./checkpoints/train/ckpt-17
Time taken for epoch 85 is 301.77787947654724 sec

Training epoch 86 of 200.
.........
W0730 23:46:02.411040 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Time taken for epoch 86 is 298.3962996006012 sec

Training epoch 87 of 200.
.........
W0730 23:50:59.658373 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Time taken for epoch 87 is 297.2410750389099 sec

Training epoch 88 of 200.
.........
W0730 23:55:57.821455 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Time taken for epoch 88 is 298.1834890842438 sec

Training epoch 89 of 200.
.........
W0731 00:00:56.428205 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Time taken for epoch 89 is 298.58390045166016 sec

Training epoch 90 of 200.
.........
W0731 00:05:54.046401 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Saving checkpoint for epoch 90 at ./checkpoints/train/ckpt-18
Time taken for epoch 90 is 300.1249556541443 sec

Training epoch 91 of 200.
.........
W0731 00:10:54.314464 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Time taken for epoch 91 is 297.7586154937744 sec

Training epoch 92 of 200.
.........
W0731 00:15:52.886431 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Time taken for epoch 92 is 298.59238743782043 sec

Training epoch 93 of 200.
.........
W0731 00:20:52.991456 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Time taken for epoch 93 is 300.0912642478943 sec

Training epoch 94 of 200.
.........
W0731 00:25:50.887462 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Time taken for epoch 94 is 297.88988304138184 sec

Training epoch 95 of 200.
.........
W0731 00:30:48.209871 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Saving checkpoint for epoch 95 at ./checkpoints/train/ckpt-19
Time taken for epoch 95 is 302.7141089439392 sec

Training epoch 96 of 200.
.........
W0731 00:35:51.172552 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Time taken for epoch 96 is 297.56925439834595 sec

Training epoch 97 of 200.
.........
W0731 00:40:48.729167 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Time taken for epoch 97 is 297.564133644104 sec

Training epoch 98 of 200.
.........
W0731 00:45:46.351950 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Time taken for epoch 98 is 297.6222333908081 sec

Training epoch 99 of 200.
.........
W0731 00:50:42.764065 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Time taken for epoch 99 is 296.4053542613983 sec

Training epoch 100 of 200.
.........
W0731 00:55:38.645973 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Saving checkpoint for epoch 100 at ./checkpoints/train/ckpt-20
Time taken for epoch 100 is 301.4214012622833 sec

Training epoch 101 of 200.
.........
W0731 01:00:39.558825 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Time taken for epoch 101 is 295.3671832084656 sec

Training epoch 102 of 200.
.........
W0731 01:05:36.134438 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Time taken for epoch 102 is 296.58596634864807 sec

Training epoch 103 of 200.
.........
W0731 01:10:32.539427 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Time taken for epoch 103 is 296.42796301841736 sec

Training epoch 104 of 200.
.........
W0731 01:15:28.801543 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Time taken for epoch 104 is 296.2434046268463 sec

Training epoch 105 of 200.
.........
W0731 01:20:25.639951 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Saving checkpoint for epoch 105 at ./checkpoints/train/ckpt-21
Time taken for epoch 105 is 302.4086995124817 sec

Training epoch 106 of 200.
.........
W0731 01:25:27.727542 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Time taken for epoch 106 is 296.5102951526642 sec

Training epoch 107 of 200.
.........
W0731 01:30:24.241249 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Time taken for epoch 107 is 296.50759863853455 sec

Training epoch 108 of 200.
.........
W0731 01:35:20.658424 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Time taken for epoch 108 is 296.4359965324402 sec

Training epoch 109 of 200.
.........
W0731 01:40:17.035820 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Time taken for epoch 109 is 296.37213373184204 sec

Training epoch 110 of 200.
.........
W0731 01:45:12.765283 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Saving checkpoint for epoch 110 at ./checkpoints/train/ckpt-22
Time taken for epoch 110 is 302.35012221336365 sec

Training epoch 111 of 200.
.........
Time taken for epoch 111 is 296.4241626262665 sec

Training epoch 112 of 200.
.........
W0731 01:55:11.479795 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Time taken for epoch 112 is 295.6554751396179 sec

Training epoch 113 of 200.
.........
W0731 02:00:07.599147 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Time taken for epoch 113 is 296.1391987800598 sec

Training epoch 114 of 200.
.........
W0731 02:05:02.511375 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Time taken for epoch 114 is 294.8979244232178 sec

Training epoch 115 of 200.
.........
W0731 02:09:58.368232 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Saving checkpoint for epoch 115 at ./checkpoints/train/ckpt-23
Time taken for epoch 115 is 302.6609525680542 sec

Training epoch 116 of 200.
.........
W0731 02:15:00.731466 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Time taken for epoch 116 is 295.57253789901733 sec

Training epoch 117 of 200.
.........
W0731 02:19:57.453360 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Time taken for epoch 117 is 296.7010169029236 sec

Training epoch 118 of 200.
.........
W0731 02:24:53.336491 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Time taken for epoch 118 is 295.89859318733215 sec

Training epoch 119 of 200.
.........
W0731 02:29:50.664868 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Time taken for epoch 119 is 297.3369252681732 sec

Training epoch 120 of 200.
.........
W0731 02:34:47.194511 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Saving checkpoint for epoch 120 at ./checkpoints/train/ckpt-24
Time taken for epoch 120 is 300.57201647758484 sec

Training epoch 121 of 200.
.........
W0731 02:39:47.551118 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Time taken for epoch 121 is 296.3232126235962 sec

Training epoch 122 of 200.
.........
W0731 02:44:43.845624 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Time taken for epoch 122 is 296.26593136787415 sec

Training epoch 123 of 200.
.........
W0731 02:49:40.528310 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Time taken for epoch 123 is 296.6896171569824 sec

Training epoch 124 of 200.
.........
W0731 02:54:37.095158 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Time taken for epoch 124 is 296.57950496673584 sec

Training epoch 125 of 200.
.........
W0731 02:59:33.806699 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Saving checkpoint for epoch 125 at ./checkpoints/train/ckpt-25
Time taken for epoch 125 is 300.81541633605957 sec

Training epoch 126 of 200.
.........
W0731 03:04:35.184473 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Time taken for epoch 126 is 297.2667372226715 sec

Training epoch 127 of 200.
.........
W0731 03:09:31.747631 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Time taken for epoch 127 is 296.5634491443634 sec

Training epoch 128 of 200.
.........
W0731 03:14:28.218626 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Time taken for epoch 128 is 296.47442078590393 sec

Training epoch 129 of 200.
.........
W0731 03:19:25.622399 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Time taken for epoch 129 is 297.39806365966797 sec

Training epoch 130 of 200.
.........
W0731 03:24:22.991117 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Saving checkpoint for epoch 130 at ./checkpoints/train/ckpt-26
Time taken for epoch 130 is 301.2586581707001 sec

Training epoch 131 of 200.
.........
W0731 03:29:23.634337 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Time taken for epoch 131 is 296.7838547229767 sec

Training epoch 132 of 200.
.........
W0731 03:34:21.160166 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Time taken for epoch 132 is 297.4880483150482 sec

Training epoch 133 of 200.
.........
W0731 03:39:17.734626 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Time taken for epoch 133 is 296.5813498497009 sec

Training epoch 134 of 200.
.........
W0731 03:44:15.187345 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Time taken for epoch 134 is 297.4456479549408 sec

Training epoch 135 of 200.
.........
W0731 03:49:11.834174 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Saving checkpoint for epoch 135 at ./checkpoints/train/ckpt-27
Time taken for epoch 135 is 301.0226876735687 sec

Training epoch 136 of 200.
.........
W0731 03:54:13.652788 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Time taken for epoch 136 is 297.4585757255554 sec

Training epoch 137 of 200.
.........
W0731 03:59:11.637511 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Time taken for epoch 137 is 297.9743812084198 sec

Training epoch 138 of 200.
.........
W0731 04:04:09.134597 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Time taken for epoch 138 is 297.4887821674347 sec

Training epoch 139 of 200.
.........
W0731 04:09:05.928676 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Time taken for epoch 139 is 296.7929997444153 sec

Training epoch 140 of 200.
.........
W0731 04:14:04.354236 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Saving checkpoint for epoch 140 at ./checkpoints/train/ckpt-28
Time taken for epoch 140 is 301.0905797481537 sec

Training epoch 141 of 200.
.........
W0731 04:19:04.240801 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Time taken for epoch 141 is 297.23362827301025 sec

Training epoch 142 of 200.
.........
W0731 04:24:02.684471 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Time taken for epoch 142 is 298.46106123924255 sec

Training epoch 143 of 200.
.........
W0731 04:29:00.375813 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Time taken for epoch 143 is 297.6646201610565 sec

Training epoch 144 of 200.
.........
W0731 04:33:58.287514 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Time taken for epoch 144 is 297.9028127193451 sec

Training epoch 145 of 200.
.........
W0731 04:38:57.340070 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Saving checkpoint for epoch 145 at ./checkpoints/train/ckpt-29
Time taken for epoch 145 is 301.69797539711 sec

Training epoch 146 of 200.
.........
W0731 04:43:57.632453 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Time taken for epoch 146 is 297.67379331588745 sec

Training epoch 147 of 200.
.........
W0731 04:48:55.493398 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Time taken for epoch 147 is 297.83946228027344 sec

Training epoch 148 of 200.
.........
W0731 04:53:53.087409 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Time taken for epoch 148 is 297.616938829422 sec

Training epoch 149 of 200.
.........
W0731 04:58:50.399914 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Time taken for epoch 149 is 297.29286551475525 sec

Training epoch 150 of 200.
.........
W0731 05:03:48.519203 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Saving checkpoint for epoch 150 at ./checkpoints/train/ckpt-30
Time taken for epoch 150 is 302.8087077140808 sec

Training epoch 151 of 200.
.........
W0731 05:08:50.508460 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Time taken for epoch 151 is 297.29978704452515 sec

Training epoch 152 of 200.
.........
W0731 05:13:48.571505 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Time taken for epoch 152 is 298.0671761035919 sec

Training epoch 153 of 200.
.........
W0731 05:18:46.434192 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Time taken for epoch 153 is 297.85345125198364 sec

Training epoch 154 of 200.
.........
W0731 05:23:44.378925 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Time taken for epoch 154 is 297.9530577659607 sec

Training epoch 155 of 200.
.........
W0731 05:28:43.375635 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Saving checkpoint for epoch 155 at ./checkpoints/train/ckpt-31
Time taken for epoch 155 is 303.750474691391 sec

Training epoch 156 of 200.
.........
W0731 05:33:46.100607 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Time taken for epoch 156 is 297.97204637527466 sec

Training epoch 157 of 200.
.........
W0731 05:38:44.086243 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Time taken for epoch 157 is 297.9795536994934 sec

Training epoch 158 of 200.
.........
W0731 05:43:41.423645 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Time taken for epoch 158 is 297.3366234302521 sec

Training epoch 159 of 200.
.........
W0731 05:48:38.285436 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Time taken for epoch 159 is 296.85637164115906 sec

Training epoch 160 of 200.
.........
W0731 05:53:35.767308 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Saving checkpoint for epoch 160 at ./checkpoints/train/ckpt-32
Time taken for epoch 160 is 303.02347469329834 sec

Training epoch 161 of 200.
.........
W0731 05:58:38.945667 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Time taken for epoch 161 is 297.66098403930664 sec

Training epoch 162 of 200.
.........
W0731 06:03:35.523222 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Time taken for epoch 162 is 296.5662422180176 sec

Training epoch 163 of 200.
.........
W0731 06:08:32.901739 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Time taken for epoch 163 is 297.3914005756378 sec

Training epoch 164 of 200.
.........
W0731 06:13:30.619138 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Time taken for epoch 164 is 297.70132279396057 sec

Training epoch 165 of 200.
.........
W0731 06:18:28.070265 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Saving checkpoint for epoch 165 at ./checkpoints/train/ckpt-33
Time taken for epoch 165 is 303.24244260787964 sec

Training epoch 166 of 200.
.........
W0731 06:23:31.139853 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Time taken for epoch 166 is 297.27205777168274 sec

Training epoch 167 of 200.
.........
W0731 06:28:29.208883 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Time taken for epoch 167 is 298.0910527706146 sec

Training epoch 168 of 200.
.........
W0731 06:33:26.409101 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Time taken for epoch 168 is 297.18001651763916 sec

Training epoch 169 of 200.
.........
W0731 06:38:23.874624 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Time taken for epoch 169 is 297.48199939727783 sec

Training epoch 170 of 200.
.........
W0731 06:43:21.430614 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Saving checkpoint for epoch 170 at ./checkpoints/train/ckpt-34
Time taken for epoch 170 is 304.4533586502075 sec

Training epoch 171 of 200.
.........
W0731 06:48:26.822367 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Time taken for epoch 171 is 298.47261452674866 sec

Training epoch 172 of 200.
.........
W0731 06:53:24.678745 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Time taken for epoch 172 is 297.88161516189575 sec

Training epoch 173 of 200.
.........
W0731 06:58:22.018948 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Time taken for epoch 173 is 297.3320801258087 sec

Training epoch 174 of 200.
.........
W0731 07:03:17.981318 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Time taken for epoch 174 is 295.9535436630249 sec

Training epoch 175 of 200.
.........
W0731 07:08:15.129890 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Saving checkpoint for epoch 175 at ./checkpoints/train/ckpt-35
Time taken for epoch 175 is 301.5702292919159 sec

Training epoch 176 of 200.
.........
W0731 07:13:16.093732 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Time taken for epoch 176 is 296.5567123889923 sec

Training epoch 177 of 200.
.........
W0731 07:18:13.483795 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Time taken for epoch 177 is 297.39825105667114 sec

Training epoch 178 of 200.
.........
W0731 07:23:10.234531 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Time taken for epoch 178 is 296.72402930259705 sec

Training epoch 179 of 200.
.........
W0731 07:28:08.662503 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Time taken for epoch 179 is 298.42387294769287 sec

Training epoch 180 of 200.
.........
W0731 07:33:05.990491 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Saving checkpoint for epoch 180 at ./checkpoints/train/ckpt-36
Time taken for epoch 180 is 302.09775972366333 sec

Training epoch 181 of 200.
.........
W0731 07:38:09.044562 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Time taken for epoch 181 is 298.2933177947998 sec

Training epoch 182 of 200.
.........
W0731 07:43:06.165209 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Time taken for epoch 182 is 297.1007182598114 sec

Training epoch 183 of 200.
.........
W0731 07:48:04.381840 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Time taken for epoch 183 is 298.24434304237366 sec

Training epoch 184 of 200.
.........
W0731 07:53:01.999794 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Time taken for epoch 184 is 297.60085248947144 sec

Training epoch 185 of 200.
.........
W0731 07:57:59.788746 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Saving checkpoint for epoch 185 at ./checkpoints/train/ckpt-37
Time taken for epoch 185 is 303.980525970459 sec

Training epoch 186 of 200.
.........
W0731 08:03:03.245823 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Time taken for epoch 186 is 297.2697422504425 sec

Training epoch 187 of 200.
.........
W0731 08:08:01.325075 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Time taken for epoch 187 is 298.1158151626587 sec

Training epoch 188 of 200.
.........
Time taken for epoch 188 is 297.861456155777 sec

Training epoch 189 of 200.
.........
W0731 08:17:57.157420 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Time taken for epoch 189 is 297.93424940109253 sec

Training epoch 190 of 200.
.........
W0731 08:22:54.383497 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Saving checkpoint for epoch 190 at ./checkpoints/train/ckpt-38
Time taken for epoch 190 is 303.9747984409332 sec

Training epoch 191 of 200.
.........
W0731 08:27:58.821366 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Time taken for epoch 191 is 297.70086097717285 sec

Training epoch 192 of 200.
.........
W0731 08:32:56.506183 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Time taken for epoch 192 is 297.67356276512146 sec

Training epoch 193 of 200.
.........
W0731 08:37:54.489094 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Time taken for epoch 193 is 297.9778182506561 sec

Training epoch 194 of 200.
.........
W0731 08:42:52.112443 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Time taken for epoch 194 is 297.6273696422577 sec

Training epoch 195 of 200.
.........
W0731 08:47:50.123766 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Saving checkpoint for epoch 195 at ./checkpoints/train/ckpt-39
Time taken for epoch 195 is 302.92923617362976 sec

Training epoch 196 of 200.
.........
W0731 08:52:52.475723 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Time taken for epoch 196 is 297.438987493515 sec

Training epoch 197 of 200.
.........
W0731 08:57:50.555465 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Time taken for epoch 197 is 298.0814628601074 sec

Training epoch 198 of 200.
.........
W0731 09:02:48.440120 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Time taken for epoch 198 is 297.87894439697266 sec

Training epoch 199 of 200.
.........
W0731 09:07:45.827727 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Time taken for epoch 199 is 297.38560700416565 sec

Training epoch 200 of 200.
.........
W0731 09:12:43.276979 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Saving checkpoint for epoch 200 at ./checkpoints/train/ckpt-40
Time taken for epoch 200 is 303.51287293434143 sec

In [34]:
for inp in test_photos_ds.take(5):
    generate_images(generator_g, inp)
W0731 09:12:50.022695 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
W0731 09:12:50.501292 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
W0731 09:12:51.015107 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
W0731 09:12:51.502151 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
W0731 09:12:51.976039 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
In [35]:
for inp in test_sketches_ds.take(5):
    generate_images(generator_f, inp)
W0731 09:12:52.479343 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
W0731 09:12:52.948038 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
W0731 09:12:53.922982 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
W0731 09:12:54.397421 140096003381056 image.py:648] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
In [ ]:
 
In [ ]: